<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增Node</title>
	<include file="Public:header" />
	<style type="text/css">
		input,textarea{width:290px; border:1px solid #ccc; padding:2px;}
		select{width:290px; border:1px solid #ccc; height:25px; padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#name').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入编码',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#title').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入名称',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#pid').val()=='')
			{
				$.messager.show({title:'提示',msg:'请请选择一个上级Node',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#sort').val()=='')
			{
				$.messager.show({title:'提示',msg:'请正确输入排序号，只能为数字',timeout:5000,showType:'slide'});
				return false;
			}
			$('#form1').submit();
		}
	</script>
</head>
<body class="">

	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>Node是应用、模块、动作的所有数据集合，如：后台管理Admin/导航管理Nav/导航列表data_list</div>
	</div>
	<form id="form1" method="post" action="{:U('Power/node_add_save')}">
		<table class="space-out-10px">
		<tr>
		<td>编码</td><td><input type="text" id="name" name="name" class="easyui-validatebox" required="true" /></td>
		</tr>
		<tr>
		<td>名称：</td><td><input type="text" id="title" name="title" class="easyui-validatebox" required="true" /></td>
		</tr>
		<tr>
		<td>上级Node：</td><td><select id="pid" name="pid" class="easyui-combobox" editable="false" style="width:290px;">
								<option value='0'>顶级</option>
								<volist name='datalist' id="datalist">
								<option value='{$datalist["id"]}'><for start="2" end="$datalist['count']">|----</for>{$datalist['title']}({$datalist['name']})</option>
								</volist>
								</select>
								<script type="text/javascript">$("#pid").attr("value","{$cid}");</script>
								</td>		
		</tr>
		<tr>
		<td>排序号</td><td><input type="text" id="sort" name="sort" value="{$orderid}" class="easyui-validatebox" required="true" /></td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="remark" name="remark" value=",0," />
		<input type="hidden" id="status" name="status" value="1" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="chkfrm()">保存</a>
		<a href="{:U('Power/node_list')}" class="easyui-linkbutton" iconCls="icon-undo">取消</a>
		</td>
		</tr>
		</table>
	</form>
</body>
</html>
